//这是一个分出来的模块( 仓库 )
export default {
    namespaced: true, //开启模块
    state: {
        collectlist: []
    },
    getters: {
    },
    mutations: {
        collect(state, payload) { //收藏一个店铺
            state.collectlist.push(payload);
        },
        cancel_collect(state, payload) { //取消收藏一个店铺
            var index = state.collectlist.findIndex((item) => {
                return item.mtWmPoiId == payload.mtWmPoiId;
            })
            if (index != -1) {
                state.collectlist.splice(index, 1);
            }
        }
    },
    actions: {
    }
}